﻿using UnityEngine;
using System.Collections;

public class Test_RotateAround : MonoBehaviour {

	public Vector3 point;
	public Vector3 axis = Vector3.up;
	public float rotateSpeed = 10;

	private void OnDrawGizmos(){
		if(transform==null){
			return;
		}

		Gizmos.color = Color.white;
		Gizmos.DrawRay(transform.position , point - transform.position);

	}

	private void Update () {
		if(transform != null){
			transform.RotateAround(point,axis,Time.deltaTime * rotateSpeed);
		}
	}
}
